import Vue from 'vue'
import VueRouter from 'vue-router'

import GlobalLayout from "@/components/GlobalLayout";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('../views/AboutView')
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    }
  },
  {
    path: "/class",
    name: "class",
    component: () => import( '../views/classs/Show')
  },
  {
    path: "/admin",
    name: "admin",
    component: () => import('../views/admin/Show')
  },
  {
    path: "/student",
    name: "student",
    component: () => import('../views/student/Show')
  },
  {
    path: "/visitor",
    name: "visitor",
    component: () => import('../views/visitor/Show')
  },
  {
    path: "/dorm",
    name: "dorm",
    component: () => import('../views/dorm/Show')
  },
  {
    path: "/dormRepair",
    name: "dormRepair",
    component: () => import('../views/dormRepair/Show')
  },

]

const router = new VueRouter({
  routes
})

export default router
